<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2025/6/30
  Time: 10:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>宠物邻里互助平台</title>
    <style>
        :root {
            --primary-color: #FFF9C4;  /* 主色调：淡黄 */
            --secondary-color: #FFECB3; /* 辅助色：琥珀黄 */
            --light-bg: #FFFDE7;       /* 背景色：浅奶油色 */
            --text-dark: #5D4037;      /* 深棕色文字 */
            --text-light: #8D6E63;     /* 浅棕色文字 */
            --border-color: #FFE082;   /* 边框色 */
            --hover-color: #FFE082;    /* 悬停色 */
            --shadow-color: rgba(255, 213, 79, 0.2); /* 阴影色 */
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
        }

        body {
            background-color: var(--light-bg);
            color: var(--text-dark);
        }

        .navbar {
            background-color: white;
            padding: 0 5%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 70px;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
            position: sticky;
            top: 0;
            z-index: 1000;
            border-bottom: 1px solid var(--border-color);
        }

        .logo {
            color: var(--text-dark);
            font-size: 24px;
            font-weight: bold;
            display: flex;
            align-items: center;
        }

        .logo i {
            margin-right: 10px;
            font-size: 28px;
            color: var(--text-dark);
        }

        .nav-links {
            display: flex;
            list-style: none;
        }

        .nav-links li {
            position: relative;
            margin: 0 12px;
        }

        .nav-links a {
            color: var(--text-dark);
            text-decoration: none;
            font-size: 15px;
            font-weight: 500;
            padding: 10px 15px;
            border-radius: 20px;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            min-width: 80px; /* 统一按钮最小宽度 */
            justify-content: center;
        }

        .nav-links a:hover {
            background-color: var(--secondary-color);
            color: var(--text-dark);
        }

        .nav-links a i {
            margin-right: 8px;
            color: var(--text-dark);
        }

        .dropdown {
            position: relative;
            display: inline-block;
        }

        .dropdown-content {
            display: none;
            position: absolute;
            background-color: white;
            min-width: 180px;
            box-shadow: 0 8px 20px var(--shadow-color);
            border-radius: 12px;
            z-index: 1;
            top: 100%;
            left: 0;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.3s ease;
            border: 1px solid var(--border-color);
            padding: 8px 0;
        }

        .dropdown:hover .dropdown-content {
            display: block;
            opacity: 1;
            transform: translateY(0);
        }

        .dropdown-content a {
            color: var(--text-dark);
            padding: 10px 20px;
            display: block;
            transition: all 0.2s;
            border-radius: 0;
            text-align: left;
            min-width: 100%;
        }

        .dropdown-content a:hover {
            background-color: var(--secondary-color);
            color: var(--text-dark);
            transform: none;
        }

        .user-avatar {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            background-color: var(--secondary-color);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
            color: var(--text-dark);
            font-weight: bold;
            font-size: 14px;
        }

        .login-btn {
            background-color: var(--secondary-color);
            color: var(--text-dark) !important;
        }

        .register-btn {
            background-color: var(--primary-color);
            color: var(--text-dark) !important;
            border: 1px solid var(--border-color);
        }

        .register-btn:hover {
            background-color: var(--hover-color) !important;
        }

        .container {
            max-width: 1200px;
            margin: 40px auto;
            padding: 30px;
            background-color: white;
            border-radius: 16px;
            box-shadow: 0 5px 25px var(--shadow-color);
        }

        h1 {
            color: var(--text-dark);
            margin-bottom: 20px;
            text-align: center;
            font-weight: 600;
            font-size: 2.2rem;
        }

        p {
            line-height: 1.8;
            color: var(--text-light);
            font-size: 16px;
            text-align: center;
            max-width: 700px;
            margin: 0 auto 20px;
        }

        .features {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 20px;
            margin-top: 40px;
        }

        .feature-card {
            background-color: var(--light-bg);
            border-radius: 12px;
            padding: 25px;
            width: 280px;
            text-align: center;
            transition: transform 0.3s ease;
            border: 1px solid var(--border-color);
        }

        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px var(--shadow-color);
            background-color: var(--secondary-color);
        }

        .feature-icon {
            font-size: 36px;
            color: var(--text-dark);
            margin-bottom: 15px;
        }

        .feature-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 12px;
            color: var(--text-dark);
        }

        .feature-desc {
            font-size: 14px;
            color: var(--text-light);
            line-height: 1.6;
        }

    </style>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
</head>
<body>
<nav class="navbar">
    <div class="logo">
        <i class="fas fa-paw"></i>
        <span>宠物邻里互助平台</span>
    </div>
    <ul class="nav-links">
        <li class="dropdown">
            <a href="#">
                <div class="user-avatar"><i class="fas fa-hands-helping"></i></div>
                服务中心 <i class="fas fa-chevron-down"></i>
            </a>
            <div class="dropdown-content">
                <a href="${pageContext.request.contextPath}/Hosts/list"><i class="fas fa-home"></i> 宠物寄养</a>
                <a href="${pageContext.request.contextPath}/Dogwalking/list"><i class="fas fa-dog"></i> 帮遛狗</a>
            </div>
        </li>

        <li>
            <a href="${pageContext.request.contextPath}/forum/list?user_id=${login_user.user_id}">
                <div class="user-avatar"><i class="fas fa-comments"></i></div>
                社区论坛
            </a>
        </li>

        <li class="dropdown">
            <a href="#">
                <div class="user-avatar"><i class="fas fa-user"></i></div>
                个人中心 <i class="fas fa-chevron-down"></i>
            </a>
            <div class="dropdown-content">
                <a href="${pageContext.request.contextPath}/user/profile"><i class="fas fa-user-circle"></i> 个人信息</a>
                <a href="${pageContext.request.contextPath}/pet/list?user_id=${login_user.user_id}"><i class="fas fa-paw"></i> 宠物信息</a>
            </div>
        </li>
        <li>
            <img src="${login_user.icon}" alt="用户头像" style="width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-color);">
        </li>

        <li>
            <a href="${pageContext.request.contextPath}/user/logout" class="login-btn">
                <div class="user-avatar"><i class="fas fa-sign-out-alt"></i></div>
                退出
            </a>
        </li>
    </ul>
</nav>
